check_hotplug fails on one of my machines running ubunto 4.10 "Warty
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Fri, 25 Nov 2005 15:26:19 +0000 (15:26 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Fri, 25 Nov 2005 15:26:19 +0000 (15:26 +0000)
Warhog", due to misparsing the udevinfo version string. The problem is
caused by an old version of sed that does not appreciate the
regexp. This patch fixes it, and also works on debian unstable and
SLES9SP2. Please apply...

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
Signed-Off-By: Orna Agmon <ladypine@ladypine.org>
install.sh
tools/check/check_hotplug

index e7dbfc24b63d31b49c7c5179a9d41e0c5b61823f..d51bc51eabf06082a7306b7559aea223d1440032 100755 (executable)
@@ -28,7 +28,7 @@ cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
 echo "All done."
 
 [ -x "$(which udevinfo)" ] && \
-  UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
+  UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
 
 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
   cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
index aaedb767bf24b45e212d57a5c5f2fe9c724d52cd..999c7d8e2e8aa2d3aade4feeaeefef9c36a49c92 100644 (file)
@@ -7,7 +7,7 @@ function error {
    exit 1
 }
 [ -x "$(which udevinfo)" ] && \
-  UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
+  UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
 
 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
   exit 0